package com.twq.oo.abstractscls

/**
 * Created by tangweiqun on 2017/11/30.
 */
class Cat {
  val dangerous = false
}

//7、参数化域除了可以用val定义，还可以用var来修饰
//参数化域前面还可以放private等修饰
class Tiger(
             override val dangerous: Boolean,
             private var age: Int
           ) extends Cat

//8、上面的Tiger的定义和下面的定义是等同的
class TigerOld(param1: Boolean, param2: Int) extends Cat {
  override val dangerous = param1
  private var age = param2
}

